import request from '@/utils/request'

export function fetchCarouselFigureList(query) {
  // hack
  return request({
    url: '/v2/carouselFigure/list',
    method: 'get',
    params: { page: query.page - 1, size: query.size }
  })
}

export function fetchListCount(query) {
  return request({
    url: '/v2/backend/carouselFigure/count',
    method: 'get',
    params: query
  })
}

export function saveCarouselFigure(data) {
  return request({
    url: '/v2/backend/carouselFigure',
    method: 'post',
    data
  })
}

export function deleteCarouselFigure(carouselFigureId) {
  return request({
    url: '/v2/backend/carouselFigure/' + carouselFigureId,
    method: 'delete'
  })
}

